package com.fmistuff.threadedcalc;
import java.math.BigInteger;

public class EvaluationThread implements Runnable
{
	ExpressionNode root;
	ThreadPool pool;
	BigInteger result;
	Thread thread;
	
	public EvaluationThread()//ExpressionNode root, ThreadPool pool)
	{
		//this.root = root;
		//this.pool = pool;
	}
	
	@Override
	public void run()
	{
		try
		{
			result = root.GetValue(pool, this);
		}
		catch (InterruptedException e)
		{
			e.printStackTrace();
		}
		finally
		{
			pool.threadCount.release();
		}
	}
}
